package demo1;

import java.util.LinkedList;
import java.util.Queue;

public class Test {
    public static void main(String[] args) {
        test2();
    }

    public static void test() {
        Queue<Integer> queue = new LinkedList<>();
        queue.offer(10);
        queue.offer(20);
        System.out.println(queue.size());
        System.out.println(queue.isEmpty());
        queue.clear();
    }
    public static void test2() {
        MyQueue myQueue = new MyQueue();
        myQueue.offer(10);
        myQueue.offer(20);
        myQueue.offer(30);
        myQueue.offer(40);
        myQueue.offer(50);
        System.out.println(myQueue.size());
        myQueue.poll();
        System.out.println(myQueue.size());
        myQueue.poll();
        myQueue.poll();
        myQueue.poll();
        System.out.println(myQueue.peek());
        myQueue.poll();
        System.out.println(myQueue.size());
    }

}
